package java20241112;

public class OutClass {
    private int a;
    static int b;
    int c;

    public void methodA() {
        a = 10;
        System.out.println(a);
    }

    public static void methodB() {
        System.out.println(b);
    }

    class InnerClass {
        int c;
        public void methodInner() {
            a = 100;
            b = 200;
            methodA();
            methodB();
            c=300;
            System.out.println(c);
            OutClass.this.c = 400;
            System.out.println(OutClass.this.c);
        }
    }

    public static void main(String[] args) {
        OutClass outClass = new OutClass();
        System.out.println(outClass.a);
        System.out.println(OutClass.b);
        System.out.println(outClass.c);
        outClass.methodA();
        outClass.methodB();
        OutClass.InnerClass innerClass = outClass.new InnerClass();
        //外类名.内类名 内对象 = 外对象.new 内类名
        innerClass.methodInner();
        //访问内成员方法，内对象.内成员方法
    }
}

